﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
using LaMalleAJeux.Properties;

namespace LaMalleAJeux.Models
{
    public class Game
    {
        public int Id { get; set; }

        [Required]
        [Display(Name = "Name", ResourceType = typeof(Resources))]
        [StringLength(50)]
        public string Name { get; set; }

        [StringLength(500)]
        [Display(Name = "Description", ResourceType = typeof(Resources))]
        public string Description { get; set; }

        [DisplayFormat(DataFormatString = "{0:c}")]
        [Display(Name = "Price", ResourceType = typeof(Resources))]
        public decimal Price { get; set; }

        [Display(Name = "Duration", ResourceType = typeof(Resources))]
        public Nullable<decimal> Duration { get; set; }

        [Display(Name = "MaximumAge", ResourceType = typeof(Resources))]
        public Nullable<int> MaximumAge { get; set; }

        [Display(Name = "MinimumAge", ResourceType = typeof(Resources))]
        public Nullable<int> MinimumAge { get; set; }

        [Display(Name = "MaximumPlayers", ResourceType = typeof(Resources))]
        public Nullable<int> MaximumPlayers { get; set; }

        [Display(Name = "MinimumPlayers", ResourceType = typeof(Resources))]
        public Nullable<int> MinimumPlayers { get; set; }

        [DataType(DataType.Date)]
        [Display(Name = "ReleaseDate", ResourceType = typeof(Resources))]
        [DisplayFormat(DataFormatString = "{0:d}")]
        public Nullable<DateTime> ReleaseDate { get; set; }

        [DataType(DataType.ImageUrl)]
        [Display(Name = "PictureUrl", ResourceType = typeof(Resources))]
        public string PictureUrl { get; set; }

        [Display(Name = "Rating", ResourceType = typeof(Resources))]
        public int Rating { get; set; }

        [Display(Name = "IsNew", ResourceType = typeof(Resources))]
        public bool IsNew { get; set; }

        [Display(Name = "IsVisible", ResourceType = typeof(Resources))]
        public bool IsVisible { get; set; }
    }
}